package com.dianping.cat.alarm.server.entity;

import com.dianping.cat.alarm.server.BaseEntity;
import com.dianping.cat.alarm.server.IVisitor;
import java.util.ArrayList;
import java.util.List;


public class Rule
  extends BaseEntity<Rule>
{
  private String m_startTime;
  private String m_endTime;
/* 14 */   private List<Condition> m_conditions = new ArrayList();






/* 21 */   public void accept(IVisitor visitor) { visitor.visitRule(this); }


  public Rule addCondition(Condition condition) {
/* 25 */     this.m_conditions.add(condition);
/* 26 */     return this;
  }


  public boolean equals(Object obj) {
/* 31 */     if (obj instanceof Rule) {
/* 32 */       Rule _o = (Rule)obj;

/* 34 */       if (!equals(getStartTime(), _o.getStartTime())) {
/* 35 */         return false;
      }

/* 38 */       if (!equals(getEndTime(), _o.getEndTime())) {
/* 39 */         return false;
      }

/* 42 */       if (!equals(getConditions(), _o.getConditions())) {
/* 43 */         return false;
      }


/* 47 */       return true;
    }

/* 50 */     return false;
  }


/* 54 */   public List<Condition> getConditions() { return this.m_conditions; }



/* 58 */   public String getEndTime() { return this.m_endTime; }



/* 62 */   public String getStartTime() { return this.m_startTime; }





  public void mergeAttributes(Rule other) {
/* 81 */     if (other.getStartTime() != null) {
/* 82 */       this.m_startTime = other.getStartTime();
    }

/* 85 */     if (other.getEndTime() != null) {
/* 86 */       this.m_endTime = other.getEndTime();
    }
  }

  public Rule setEndTime(String endTime) {
/* 91 */     this.m_endTime = endTime;
/* 92 */     return this;
  }

  public Rule setStartTime(String startTime) {
/* 96 */     this.m_startTime = startTime;
/* 97 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-alarm-3.0.0.jar!/com/dianping/cat/alarm/server/entity/Rule.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */